$def with(act, liked, joined, discuss)
$var title: 活动
$var gmap: 1

<h1> $act['subject'] </h1>
<div class="left_side">
    <div id="actchoice">
        $if act['uid'] == context.id:
            <a style="color:red; border 1px solid;"  href="/act_admin?aid=$act['id']">管理活动</a>
        $else:
            $if act['user_do'] == False:
                $if act['user_wish'] == False:
                    <a href="/activity?aid=$act['id']&interest=wish">我感兴趣</a>
                $else:
                    我对这个活动感兴趣
                <a href="/activity?aid=$act['id']&interest=do">我要参加</a>
            $else:
                我会参加这个活动
            $if act['user_do']==True or act['user_wish']==True:
                <a href="/activity?aid=$act['id']&interest=cancel">我不去了</a>
    </div>
    <div id="act_info">
        <span class="pl">类型: </span> $act['type'] <br>
        <span class="pl">基础积分: </span> $act['basecredit'] <br>
        <span class="pl">集合时间: </span> $act['gathertime'] <br>
        <span class="pl">集合地点: </span> $act['gatherlocation'] <br>
        <span class="pl">距离: </span> $act['distance'] 公里<br>
        <span class="pl">出发时间: </span> $act['startime'] <br>
        <span class="pl">创建者:</span><a href="/profile?uid=$act['uid']"> $act['creater']</a> <br>
        <span class="pl">$act['wish']人关注 $act['do']人参加</span><br>
    </div>

    <div style="clear:both"></div>
    <span class="pl">路线: </span> $act['route'] <br>
    <div class="hline"></div>
    <div class="rel_info">
        <h2>活动说明</h2>
        <div id="wr">
            $:act['descr']
        </div>
        <div class="hline"></div>
        <h2>参加的人</h2>
        <div class="obss">
            $for i in joined:
                <dl class="obu">
                    <dt>
                        <a href="/profile?uid=$i['uid']"><img src="$i['tiny_avatar']"></a>
                    </dt>
                    <dd>
                        <a href="/profile?uid=$i['uid']">$i['nickname']</a>
                    </dd>
                </dl>
        </div>
        <div style="clear:both"></div>
        <div class="hline"></div>
        <h2>感兴趣的人</h2>
        <div class="obss">
            $for i in liked:
                <dl class="obu">
                    <dt>
                        <a href="/profile?uid=$i['uid']"><img src="$i['tiny_avatar']"></a>
                    </dt>
                    <dd>
                        <a href="/profile?uid=$i['uid']">$i['nickname']</a>
                    </dd>
                </dl>
        </div>
        <div style="clear:both"></div>
        <div class="hline"></div>
        <h2>讨论列表</h2>
        <div class="indent">
            <table class="olt">
                <tbody>
                    <tr>
                        <td width="42%"></td>
                        <td width="22%"></td>
                        <td width="12%"></td>
                        <td width="24%"></td>
                    </tr>
                    $for i in discuss:
                        <tr>
                            <td> 
                                $if i['up'] == 1:
                                    <img src="/static/up.gif" alt="置顶" />
                                <a href="/discuss_show?tid=$i['id']&aid=$i['aid']"> $i['subject'] </a>
                            </td>
                            <td class="pl">
                                来自<a href="/profile?uid=$i['uid']">$i['owner']</a>
                            </td>
                            <td class="pl">
                                $i['reply'] 跟贴
                            </td>
                            <td class="pl">
                                $i['atime'] 
                            </td>
                        </tr>
                </tbody>
            </table>
        </div>
        <p align="right" style="margin-top: 5px">
        <a href="/discuss_create?aid=$act['id']">我要发言</a>
        </p>
    </div>
</div>
<div class="right_side">
    <span><a href="/act_add">>>我要发布活动</a></span>
    <div id="map" style="width:100%; height: 450px; margin: 20px 0 0 0;"></div>
        <script type="text/javascript">
        //<![CDATA[

        function load() {
          if (GBrowserIsCompatible()) {
            var map = new GMap2(document.getElementById("map"));
            point = new GLatLng($act['coordx'], $act['coordy']);

            map.setUIToDefault();
            map.setCenter(point, 13);

            map.addOverlay(new GMarker(point));
          }
        }

        //]]>
        </script>
</div>
